<script>
  export default {
    onLaunch: function() {
      try {
        const res = uni.getSystemInfoSync() || {};
        this.$store.dispatch("equipment/setSystemInfo", res);
      } catch (e) {
        // error
      }
      //#ifdef MP-WEIXIN
      let menuButtonInfo = uni
        .getMenuButtonBoundingClientRect() || {}; // 微信小程序胶囊的位置
      this.$store.dispatch("equipment/setMenuButtonInfo", menuButtonInfo);
      //#endif
    },
    onShow: function() {},
    onHide: function() {},
    onPageNotFound() {
      this.$u.route("/pages/tabbar/tab_index/tab_index");
    },
  };
</script>
